﻿<%@ Page Title="" Language="C#" MasterPageFile="~/WSweb.Master" AutoEventWireup="true" CodeBehind="Vijest.aspx.cs" Inherits="WSweb.Vijest" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link rel="stylesheet" type="text/css" href="css/vijest.css" media="screen" />
    <style type="text/css">
        .style1
        {
            font-size: small;
            color: #999999;
        }
    </style>
    <script src="js/jquery.sharrre-1.3.2.min.js" type="text/javascript"></script>
    <script src="js/share.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form id="form1" runat="server">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:DBwswebCS %>" 
        SelectCommand="SELECT [id_vijest], [naziv], [sadrzaj], [datum], [username], [image_id], [image_title], [image_height] FROM [Vijest] WHERE ([id_vijest] = @id_vijest)">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="1" Name="id_vijest" 
                QueryStringField="id" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:FormView ID="FormView1" runat="server" DataKeyNames="id_vijest" 
        DataSourceID="SqlDataSource1" Width="915px">
        <EditItemTemplate>
            id_vijest:
            <asp:Label ID="id_vijestLabel1" runat="server" 
                Text='<%# Eval("id_vijest") %>' />
            <br />
            naziv:
            <asp:TextBox ID="nazivTextBox" runat="server" Text='<%# Bind("naziv") %>' />
            <br />
            sadrzaj:
            <asp:TextBox ID="sadrzajTextBox" runat="server" Text='<%# Bind("sadrzaj") %>' />
            <br />
            datum:
            <asp:TextBox ID="datumTextBox" runat="server" Text='<%# Bind("datum") %>' />
            <br />
            username:
            <asp:TextBox ID="usernameTextBox" runat="server" 
                Text='<%# Bind("username") %>' />
            <br />
            image_id:
            <asp:TextBox ID="image_idTextBox" runat="server" 
                Text='<%# Bind("image_id") %>' />
            <br />
            image_title:
            <asp:TextBox ID="TextBox1" runat="server" 
                Text='<%# Bind("image_title") %>' />
            <br />
            image_height:
            <asp:TextBox ID="TextBox2" runat="server" 
                Text='<%# Bind("image_height") %>' />
            <br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                CommandName="Update" Text="Update" />
            &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancel" />
        </EditItemTemplate>
        <EmptyDataTemplate>
            <span style="font:18px 'century gothic';">Vijest ne postoji.</span>
            <a href="javascript:Back();" title="Idi natrag" style="position:relative; top:0px;left:705px;">&lt; Idi natrag</a>
        </EmptyDataTemplate>
        <InsertItemTemplate>
            naziv:
            <asp:TextBox ID="nazivTextBox" runat="server" Text='<%# Bind("naziv") %>' />
            <br />
            sadrzaj:
            <asp:TextBox ID="sadrzajTextBox" runat="server" Text='<%# Bind("sadrzaj") %>' />
            <br />
            datum:
            <asp:TextBox ID="datumTextBox" runat="server" Text='<%# Bind("datum") %>' />
            <br />
            username:
            <asp:TextBox ID="usernameTextBox" runat="server" 
                Text='<%# Bind("username") %>' />
            <br />
            image_id:
            <asp:TextBox ID="image_idTextBox" runat="server" 
                Text='<%# Bind("image_id") %>' />
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                CommandName="Insert" Text="Insert" />
            &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                CausesValidation="False" CommandName="Cancel" Text="Cancel" />
        </InsertItemTemplate>
        <ItemTemplate>
             <div id="share">
                <div id="twitter" data-url='wsweb.hr/Novosti.aspx#vijest<%# Eval("id_vijest") %>' data-text="Podjeli na twitter-u" data-title="Tweet"></div>
                <div id="facebook" data-url='wsweb.hr/Novosti.aspx#vijest<%# Eval("id_vijest") %>' data-text="Podjeli na Facebook-u" data-title="Like"></div>
                <div id="googleplus" data-url='wsweb.hr/Novosti.aspx#vijest<%# Eval("id_vijest") %>' data-text="Podjeli na Google+ " data-title="+1"></div>
            </div>
            <asp:Label ID="nazivLabel" runat="server" Font-Size="X-Large" 
                ForeColor="White" Text='<%# Bind("naziv") %>' Font-Bold="True" />
            <p>
                <asp:Image ID="imageVijest" runat="server" Height='<%# (int)Eval("image_height") %>' ImageUrl='<%# "imgHandler.ashx?id=" + Eval("image_id") %>' CssClass="novosti-img" AlternateText='<%# Eval("image_title") %>' /> 
            </p>
            <asp:Label ID="sadrzajLabel" runat="server" Text='<%# Bind("sadrzaj") %>' />
            <br />
            <br />
            <span class="style1"><em>Dodano:</em></span>
            <asp:Label ID="datumLabel" runat="server" ForeColor="#999999" 
                Text='<%# Bind("datum") %>' Font-Size="Small" Font-Italic="True" />
            <span class="style1"><em>|</em></span>
            <asp:Label ID="usernameLabel" runat="server" ForeColor="#999999" 
                Text='<%# Bind("username") %>' Font-Size="Small" Font-Italic="True" /><a href="javascript:Back();" title="Idi natrag" style="float:right;">&lt; Idi natrag</a>
            <br />
            <br />
        </ItemTemplate>
    </asp:FormView>
    </form>

</asp:Content>
